package cn.itmantzy.product.domain;

import cn.itmantzy.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class Product extends BaseDomain {

    private String name;
    // 存放fastDfs地址
    private String resources;
    private BigDecimal saleprice;
    // 下架时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date offsaletime;
    // 上架时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date onsaletime;
    // 0表示下架  1表示上架
    private Long state;
    // 成本价
    private String costprice;
    // 创建时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createtime = new Date();
    // 销量
    private Long salecount;
    // 详情
    private ProductDetail productDetail = new ProductDetail();
}
